<template>
	<view class="tixian">
		<view class="header">
			<view class="h_top">
				<view class="zhi">团队消费总额（元）</view>
				<view class="num">{{userteam.teamMoneyNum}}</view>
				
			</view>
		</view>
		<view class="list">
			<view class="bg">
				<view class="bg_">
					<view class="one">
						<view style="color:#333333;font-size:30rpx;">我的消费</view>
						<view style="color:#222222;font-size:26rpx;">{{userteam.myNum}}</view>
					</view>
					<view class="one">
						<view style="color:#333333;font-size:30rpx;">团队人数</view>
						<view style="color:#222222;font-size:26rpx;">{{userteam.teamPersonNum}}</view>
					</view>
					<view class="two">
						<view style="color:#333333;font-size:30rpx;">粉丝人数</view>
						<view style="color:#222222;font-size:26rpx;">{{userteam.firstLineNum}}</view>
					</view>
					<view class="two">
						<view style="color:#333333;font-size:30rpx;">直推VIP</view>
						<view style="color:#222222;font-size:26rpx;">{{userteam.vipnum}}</view>
					</view>
				</view>
			</view>
			<view class="" style="padding: 0 20rpx;margin-top: 120rpx;">
				<view class="list_" v-for="item in list" :key="item.id">
					<view class="list_con">
						<view class="list_top" style="display:block;width:100%;">
							<view class="title" style="float:left;width:25%;">{{item.userNickname}}</view>
							<view class="title" style="float:left;width:40%;">{{item.userPhone}}</view>
							<view class="add" style="float:left;width:35%;text-align: left;">团队数：{{item.teamPersonNum}}人</view>
						</view>
						<view class="list_top" style="display:block;width:100%;margin-top:10rpx;">
							<view class="title" style="colro:#444444;float:left;width:65%;">注册时间：{{item.created_at}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				tuandui:0,
				userteam:[],
				hasData:0
			}
		},
		onLoad() {
			uni.setNavigationBarTitle({
			    title: '粉丝团'
			});
			this.userinfo=uni.getStorageSync('user');
			this.getinfo();
		},
		methods: {
			getinfo(){
				var that=this;
				this.$http.get('user/getTeam',{}).
				then(function (response) {
					that.list=response.data;
					that.tuandui=response.data[0]['num'];
					that.userteam=response.data[0]['team'];
					that.hasData=response.data[0]['hasData'];
				}).catch(function (error) {
					console.log(error);
				});
				
				
			}
		}
	}
</script>

<style scoped lang="scss">
	.tixian{
		width: 100%;
		.header{
			position: fixed;
			top: (var(--window-top) + 0rpx);
			left: 0;
			background-color: #284179;
			width: 100%;
			padding: 70rpx 0 100rpx 0;
			color: #FFFFFF;
			z-index: 5;
			display: flex;
			.h_top{
				text-align: center;
				padding: 0 20rpx;
				box-sizing: border-box;
				width:100%;
				.num{
					margin-top: 20rpx;
					font-size: 50rpx;
				}
				.zhi{
					font-size: 26rpx;
					line-height: 50rpx;
				}
			}
			.h_top_right{
				text-align: center;
				padding: 0 20rpx;
				box-sizing: border-box;
				width:50%;
				.num{
					margin-top: 20rpx;
					font-size: 50rpx;
				}
				.zhi{
					font-size: 26rpx;
					line-height: 50rpx;
				}
			}
			.tx_btn{
				margin-right: 20rpx;
				width: 140rpx;
				height: 56rpx;
				text-align: center;
				border-radius: 3px;
				line-height: 56rpx;
				background-color: #FFFFFF;
				color: #454545;
				font-size: 30rpx;
			}
		}
		.list{
			position: absolute;
			top: 250rpx;
			width: 100%;
			.bg{
				width: 100%;
				height: 110rpx;
				border-radius: 30rpx 30rpx 0 0;
				background-color: #FFFFFF;
				position: fixed;
				z-index: 10;
				padding: 0 20rpx;
				box-sizing: border-box;
				.bg_{
					
					border-bottom: 1px solid #ebebeb;
					height: 110rpx;
					display: flex;
					color: #454545;
					align-items: center;
					justify-content: space-between;
					font-size: 34rpx;
					.one{
						flex: .55;text-align: center;
					}
					.two{
						flex: .4;text-align: center;
					}
				}
			}
			.list_{
				display: flex;
				height: 200rpx;
				align-items: center;
				border-bottom: 1px solid #ebebeb;
				&:first-child{
					
				}
				.l_img{
					margin-right: 20rpx;
					width: 84rpx;
					height: 84rpx;
					border-radius: 50%;
				}
				.list_con{
					flex: 1;
					padding: 35rpx 0 25rpx 0;
					.list_top{
						width: 100%;
						height: 44rpx;
						align-items: center;
						display: flex;
						justify-content: space-between;
						.title{
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							color: #363636;
							font-size: 30rpx;
							width:60%;
						}
						.add{
							//flex: .5;
							text-align: center;
							color: #363636;
							font-size: 30rpx;
							width:50%;
						}
						.time{
							color: #979797;
							font-size: 24rpx;
						}
					}
				}
			}
		}
	}
</style>
